home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gtk-2.0 / gtk / gtkstyle.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  28.1 KB  |  897 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Lesser General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.     See the GNU
  12.  * Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. /*
  21.  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  22.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  23.  * files for a list of changes.  These files are distributed with
  24.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  25.  */
  26.  
  27. #ifndef __GTK_STYLE_H__
  28. #define __GTK_STYLE_H__
  29.  
  30.  
  31. #include <gdk/gdk.h>
  32. #include <gtk/gtkenums.h>
  33. #include <pango/pango.h>
  34.  
  35. G_BEGIN_DECLS
  36.  
  37. #define GTK_TYPE_STYLE              (gtk_style_get_type ())
  38. #define GTK_STYLE(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
  39. #define GTK_STYLE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STYLE, GtkStyleClass))
  40. #define GTK_IS_STYLE(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_STYLE))
  41. #define GTK_IS_STYLE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
  42. #define GTK_STYLE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
  43.  
  44. #define GTK_TYPE_BORDER             (gtk_border_get_type ())
  45.  
  46. /* Some forward declarations needed to rationalize the header
  47.  * files.
  48.  */
  49. typedef struct _GtkBorder      GtkBorder;
  50. typedef struct _GtkStyle       GtkStyle;
  51. typedef struct _GtkStyleClass  GtkStyleClass;
  52. typedef struct _GtkThemeEngine GtkThemeEngine;
  53. typedef struct _GtkRcStyle     GtkRcStyle;
  54. typedef struct _GtkIconSet     GtkIconSet;
  55. typedef struct _GtkIconSource  GtkIconSource;
  56. typedef struct _GtkRcProperty  GtkRcProperty;
  57. typedef struct _GtkSettings    GtkSettings;
  58. typedef gboolean (*GtkRcPropertyParser) (const GParamSpec *pspec,
  59.                      const GString    *rc_string,
  60.                      GValue           *property_value);
  61.  
  62. /* We make this forward declaration here, since we pass
  63.  * GtkWidget's to the draw functions.
  64.  */
  65. typedef struct _GtkWidget      GtkWidget;
  66.  
  67. #define GTK_STYLE_ATTACHED(style)    (GTK_STYLE (style)->attach_count > 0)
  68.  
  69. struct _GtkStyle
  70. {
  71.   GObject parent_instance;
  72.  
  73.   /*< public >*/
  74.   
  75.   GdkColor fg[5];
  76.   GdkColor bg[5];
  77.   GdkColor light[5];
  78.   GdkColor dark[5];
  79.   GdkColor mid[5];
  80.   GdkColor text[5];
  81.   GdkColor base[5];
  82.   GdkColor text_aa[5];        /* Halfway between text/base */
  83.   
  84.   GdkColor black;
  85.   GdkColor white;
  86.   PangoFontDescription *font_desc;
  87.   
  88.   gint xthickness;
  89.   gint ythickness;
  90.   
  91.   GdkGC *fg_gc[5];
  92.   GdkGC *bg_gc[5];
  93.   GdkGC *light_gc[5];
  94.   GdkGC *dark_gc[5];
  95.   GdkGC *mid_gc[5];
  96.   GdkGC *text_gc[5];
  97.   GdkGC *base_gc[5];
  98.   GdkGC *text_aa_gc[5];
  99.   GdkGC *black_gc;
  100.   GdkGC *white_gc;
  101.   
  102.   GdkPixmap *bg_pixmap[5];
  103.  
  104.   /*< private >*/
  105.   
  106.   gint attach_count;
  107.   
  108.   gint depth;
  109.   GdkColormap *colormap;
  110.   GdkFont *private_font;
  111.   PangoFontDescription *private_font_desc; /* Font description for style->private_font or %NULL */
  112.   
  113.   /* the RcStyle from which this style was created */
  114.   GtkRcStyle     *rc_style;
  115.  
  116.   GSList     *styles;      /* of type GtkStyle* */
  117.   GArray     *property_cache;
  118.   GSList         *icon_factories; /* of type GtkIconFactory* */
  119. };
  120.  
  121. struct _GtkStyleClass
  122. {
  123.   GObjectClass parent_class;
  124.  
  125.   /* Initialize for a particular colormap/depth
  126.    * combination. style->colormap/style->depth will have
  127.    * been set at this point. Will typically chain to parent.
  128.    */
  129.   void (*realize)               (GtkStyle               *style);
  130.  
  131.   /* Clean up for a particular colormap/depth combination. Will
  132.    * typically chain to parent.
  133.    */
  134.   void (*unrealize)             (GtkStyle               *style);
  135.  
  136.   /* Make style an exact duplicate of src.
  137.    */
  138.   void (*copy)                  (GtkStyle               *style,
  139.                  GtkStyle               *src);
  140.  
  141.   /* Create an empty style of the same type as this style.
  142.    * The default implementation, which does
  143.    * g_object_new (G_OBJECT_TYPE (style), NULL);
  144.    * should work in most cases.
  145.    */
  146.   GtkStyle *(*clone)             (GtkStyle               *style);
  147.  
  148.   /* Initialize the GtkStyle with the values in the GtkRcStyle.
  149.    * should chain to the parent implementation.
  150.    */
  151.   void     (*init_from_rc)      (GtkStyle               *style,
  152.                  GtkRcStyle             *rc_style);
  153.  
  154.   void (*set_background)        (GtkStyle               *style,
  155.                  GdkWindow              *window,
  156.                  GtkStateType            state_type);
  157.  
  158.  
  159.   GdkPixbuf * (* render_icon)   (GtkStyle               *style,
  160.                                  const GtkIconSource    *source,
  161.                                  GtkTextDirection        direction,
  162.                                  GtkStateType            state,
  163.                                  GtkIconSize             size,
  164.                                  GtkWidget              *widget,
  165.                                  const gchar            *detail);
  166.   
  167.   /* Drawing functions
  168.    */
  169.   
  170.   void (*draw_hline)        (GtkStyle        *style,
  171.                  GdkWindow        *window,
  172.                  GtkStateType         state_type,
  173.                  GdkRectangle        *area,
  174.                  GtkWidget        *widget,
  175.                  const gchar        *detail,
  176.                  gint             x1,
  177.                  gint             x2,
  178.                  gint             y);
  179.   void (*draw_vline)        (GtkStyle        *style,
  180.                  GdkWindow        *window,
  181.                  GtkStateType         state_type,
  182.                  GdkRectangle        *area,
  183.                  GtkWidget        *widget,
  184.                  const gchar        *detail,
  185.                  gint             y1_,
  186.                  gint             y2_,
  187.                  gint             x);
  188.   void (*draw_shadow)        (GtkStyle        *style,
  189.                  GdkWindow        *window,
  190.                  GtkStateType         state_type,
  191.                  GtkShadowType         shadow_type,
  192.                  GdkRectangle        *area,
  193.                  GtkWidget        *widget,
  194.                  const gchar        *detail,
  195.                  gint             x,
  196.                  gint             y,
  197.                  gint             width,
  198.                  gint             height);
  199.   void (*draw_polygon)        (GtkStyle        *style,
  200.                  GdkWindow        *window,
  201.                  GtkStateType         state_type,
  202.                  GtkShadowType         shadow_type,
  203.                  GdkRectangle        *area,
  204.                  GtkWidget        *widget,
  205.                  const gchar        *detail,
  206.                  GdkPoint        *point,
  207.                  gint             npoints,
  208.                  gboolean         fill);
  209.   void (*draw_arrow)        (GtkStyle        *style,
  210.                  GdkWindow        *window,
  211.                  GtkStateType         state_type,
  212.                  GtkShadowType         shadow_type,
  213.                  GdkRectangle        *area,
  214.                  GtkWidget        *widget,
  215.                  const gchar        *detail,
  216.                  GtkArrowType         arrow_type,
  217.                  gboolean         fill,
  218.                  gint             x,
  219.                  gint             y,
  220.                  gint             width,
  221.                  gint             height);
  222.   void (*draw_diamond)        (GtkStyle        *style,
  223.                  GdkWindow        *window,
  224.                  GtkStateType         state_type,
  225.                  GtkShadowType         shadow_type,
  226.                  GdkRectangle        *area,
  227.                  GtkWidget        *widget,
  228.                  const gchar        *detail,
  229.                  gint             x,
  230.                  gint             y,
  231.                  gint             width,
  232.                  gint             height);
  233.   void (*draw_string)        (GtkStyle        *style,
  234.                  GdkWindow        *window,
  235.                  GtkStateType         state_type,
  236.                  GdkRectangle        *area,
  237.                  GtkWidget        *widget,
  238.                  const gchar        *detail,
  239.                  gint             x,
  240.                  gint             y,
  241.                  const gchar        *string);
  242.   void (*draw_box)        (GtkStyle        *style,
  243.                  GdkWindow        *window,
  244.                  GtkStateType         state_type,
  245.                  GtkShadowType         shadow_type,
  246.                  GdkRectangle        *area,
  247.                  GtkWidget        *widget,
  248.                  const gchar        *detail,
  249.                  gint             x,
  250.                  gint             y,
  251.                  gint             width,
  252.                  gint             height);
  253.   void (*draw_flat_box)        (GtkStyle        *style,
  254.                  GdkWindow        *window,
  255.                  GtkStateType         state_type,
  256.                  GtkShadowType         shadow_type,
  257.                  GdkRectangle        *area,
  258.                  GtkWidget        *widget,
  259.                  const gchar        *detail,
  260.                  gint             x,
  261.                  gint             y,
  262.                  gint             width,
  263.                  gint             height);
  264.   void (*draw_check)        (GtkStyle        *style,
  265.                  GdkWindow        *window,
  266.                  GtkStateType         state_type,
  267.                  GtkShadowType         shadow_type,
  268.                  GdkRectangle        *area,
  269.                  GtkWidget        *widget,
  270.                  const gchar        *detail,
  271.                  gint             x,
  272.                  gint             y,
  273.                  gint             width,
  274.                  gint             height);
  275.   void (*draw_option)        (GtkStyle        *style,
  276.                  GdkWindow        *window,
  277.                  GtkStateType         state_type,
  278.                  GtkShadowType         shadow_type,
  279.                  GdkRectangle        *area,
  280.                  GtkWidget        *widget,
  281.                  const gchar        *detail,
  282.                  gint             x,
  283.                  gint             y,
  284.                  gint             width,
  285.                  gint             height);
  286.   void (*draw_tab)        (GtkStyle        *style,
  287.                  GdkWindow        *window,
  288.                  GtkStateType         state_type,
  289.                  GtkShadowType         shadow_type,
  290.                  GdkRectangle        *area,
  291.                  GtkWidget        *widget,
  292.                  const gchar        *detail,
  293.                  gint             x,
  294.                  gint             y,
  295.                  gint             width,
  296.                  gint             height); 
  297.   void (*draw_shadow_gap)    (GtkStyle        *style,
  298.                  GdkWindow        *window,
  299.                  GtkStateType         state_type,
  300.                  GtkShadowType         shadow_type,
  301.                  GdkRectangle        *area,
  302.                  GtkWidget        *widget,
  303.                  const gchar        *detail,
  304.                  gint             x,
  305.                  gint             y,
  306.                  gint             width,
  307.                  gint             height,
  308.                  GtkPositionType     gap_side,
  309.                  gint             gap_x,
  310.                  gint             gap_width);
  311.   void (*draw_box_gap)        (GtkStyle        *style,
  312.                  GdkWindow        *window,
  313.                  GtkStateType         state_type,
  314.                  GtkShadowType         shadow_type,
  315.                  GdkRectangle        *area,
  316.                  GtkWidget        *widget,
  317.                  const gchar        *detail,
  318.                  gint             x,
  319.                  gint             y,
  320.                  gint             width,
  321.                  gint             height,
  322.                  GtkPositionType     gap_side,
  323.                  gint             gap_x,
  324.                  gint             gap_width);
  325.   void (*draw_extension)    (GtkStyle        *style,
  326.                  GdkWindow        *window,
  327.                  GtkStateType         state_type,
  328.                  GtkShadowType         shadow_type,
  329.                  GdkRectangle        *area,
  330.                  GtkWidget        *widget,
  331.                  const gchar        *detail,
  332.                  gint             x,
  333.                  gint             y,
  334.                  gint             width,
  335.                  gint             height,
  336.                  GtkPositionType     gap_side);
  337.   void (*draw_focus)        (GtkStyle        *style,
  338.                  GdkWindow        *window,
  339.                                  GtkStateType            state_type,
  340.                  GdkRectangle        *area,
  341.                  GtkWidget        *widget,
  342.                  const gchar        *detail,
  343.                  gint             x,
  344.                  gint             y,
  345.                  gint             width,
  346.                  gint             height);
  347.   void (*draw_slider)        (GtkStyle        *style,
  348.                  GdkWindow        *window,
  349.                  GtkStateType         state_type,
  350.                  GtkShadowType         shadow_type,
  351.                  GdkRectangle        *area,
  352.                  GtkWidget        *widget,
  353.                  const gchar        *detail,
  354.                  gint             x,
  355.                  gint             y,
  356.                  gint             width,
  357.                  gint             height,
  358.                  GtkOrientation         orientation);
  359.   void (*draw_handle)        (GtkStyle        *style,
  360.                  GdkWindow        *window,
  361.                  GtkStateType         state_type,
  362.                  GtkShadowType         shadow_type,
  363.                  GdkRectangle        *area,
  364.                  GtkWidget        *widget,
  365.                  const gchar        *detail,
  366.                  gint             x,
  367.                  gint             y,
  368.                  gint             width,
  369.                  gint             height,
  370.                  GtkOrientation         orientation);
  371.  
  372.   void (*draw_expander)        (GtkStyle        *style,
  373.                  GdkWindow        *window,
  374.                  GtkStateType         state_type,
  375.                  GdkRectangle        *area,
  376.                  GtkWidget        *widget,
  377.                  const gchar        *detail,
  378.                  gint             x,
  379.                  gint             y,
  380.                                  GtkExpanderStyle        expander_style);
  381.   void (*draw_layout)        (GtkStyle        *style,
  382.                  GdkWindow        *window,
  383.                  GtkStateType         state_type,
  384.                  gboolean                use_text,
  385.                  GdkRectangle        *area,
  386.                  GtkWidget        *widget,
  387.                  const gchar        *detail,
  388.                  gint             x,
  389.                  gint             y,
  390.                                  PangoLayout            *layout);
  391.   void (*draw_resize_grip)      (GtkStyle        *style,
  392.                  GdkWindow        *window,
  393.                  GtkStateType         state_type,
  394.                  GdkRectangle        *area,
  395.                  GtkWidget        *widget,
  396.                  const gchar        *detail,
  397.                                  GdkWindowEdge           edge,
  398.                  gint             x,
  399.                  gint             y,
  400.                  gint             width,
  401.                  gint             height);
  402.  
  403.   /* Padding for future expansion */
  404.   void (*_gtk_reserved1)  (void);
  405.   void (*_gtk_reserved2)  (void);
  406.   void (*_gtk_reserved3)  (void);
  407.   void (*_gtk_reserved4)  (void);
  408.   void (*_gtk_reserved5)  (void);
  409.   void (*_gtk_reserved6)  (void);
  410.   void (*_gtk_reserved7)  (void);
  411.   void (*_gtk_reserved8)  (void);
  412.   void (*_gtk_reserved9)  (void);
  413.   void (*_gtk_reserved10) (void);
  414.   void (*_gtk_reserved11) (void);
  415.   void (*_gtk_reserved12) (void);
  416. };
  417.  
  418. struct _GtkBorder
  419. {
  420.   gint left;
  421.   gint right;
  422.   gint top;
  423.   gint bottom;
  424. };
  425.  
  426. GType     gtk_style_get_type                 (void) G_GNUC_CONST;
  427. GtkStyle* gtk_style_new                 (void);
  428. GtkStyle* gtk_style_copy             (GtkStyle       *style);
  429. GtkStyle* gtk_style_attach             (GtkStyle       *style,
  430.                           GdkWindow       *window);
  431. void      gtk_style_detach             (GtkStyle       *style);
  432.  
  433. #ifndef GTK_DISABLE_DEPRECATED
  434. GtkStyle* gtk_style_ref                 (GtkStyle       *style);
  435. void      gtk_style_unref             (GtkStyle       *style);
  436.  
  437. GdkFont * gtk_style_get_font                 (GtkStyle     *style);
  438. void      gtk_style_set_font                 (GtkStyle     *style,
  439.                           GdkFont      *font);
  440. #endif /* GTK_DISABLE_DEPRECATED */
  441.  
  442. void      gtk_style_set_background         (GtkStyle       *style,
  443.                           GdkWindow       *window,
  444.                           GtkStateType  state_type);
  445. void      gtk_style_apply_default_background (GtkStyle       *style,
  446.                           GdkWindow       *window,
  447.                           gboolean        set_bg,
  448.                           GtkStateType  state_type, 
  449.                           GdkRectangle *area, 
  450.                           gint        x, 
  451.                           gint        y, 
  452.                           gint        width, 
  453.                           gint        height);
  454.  
  455. GtkIconSet* gtk_style_lookup_icon_set (GtkStyle            *style,
  456.                                        const gchar         *stock_id);
  457. GdkPixbuf*  gtk_style_render_icon     (GtkStyle            *style,
  458.                                        const GtkIconSource *source,
  459.                                        GtkTextDirection     direction,
  460.                                        GtkStateType         state,
  461.                                        GtkIconSize          size,
  462.                                        GtkWidget           *widget,
  463.                                        const gchar         *detail);
  464. #ifndef GTK_DISABLE_DEPRECATED
  465. void gtk_draw_hline      (GtkStyle        *style,
  466.               GdkWindow       *window,
  467.               GtkStateType     state_type,
  468.               gint             x1,
  469.               gint             x2,
  470.               gint             y);
  471. void gtk_draw_vline      (GtkStyle        *style,
  472.               GdkWindow       *window,
  473.               GtkStateType     state_type,
  474.               gint             y1_,
  475.               gint             y2_,
  476.               gint             x);
  477. void gtk_draw_shadow     (GtkStyle        *style,
  478.               GdkWindow       *window,
  479.               GtkStateType     state_type,
  480.               GtkShadowType    shadow_type,
  481.               gint             x,
  482.               gint             y,
  483.               gint             width,
  484.               gint             height);
  485. void gtk_draw_polygon    (GtkStyle        *style,
  486.               GdkWindow       *window,
  487.               GtkStateType     state_type,
  488.               GtkShadowType    shadow_type,
  489.               GdkPoint        *points,
  490.               gint             npoints,
  491.               gboolean         fill);
  492. void gtk_draw_arrow      (GtkStyle        *style,
  493.               GdkWindow       *window,
  494.               GtkStateType     state_type,
  495.               GtkShadowType    shadow_type,
  496.               GtkArrowType     arrow_type,
  497.               gboolean         fill,
  498.               gint             x,
  499.               gint             y,
  500.               gint             width,
  501.               gint             height);
  502. void gtk_draw_diamond    (GtkStyle        *style,
  503.               GdkWindow       *window,
  504.               GtkStateType     state_type,
  505.               GtkShadowType    shadow_type,
  506.               gint             x,
  507.               gint             y,
  508.               gint             width,
  509.               gint             height);
  510. void gtk_draw_box        (GtkStyle        *style,
  511.               GdkWindow       *window,
  512.               GtkStateType     state_type,
  513.               GtkShadowType    shadow_type,
  514.               gint             x,
  515.               gint             y,
  516.               gint             width,
  517.               gint             height);
  518. void gtk_draw_flat_box   (GtkStyle        *style,
  519.               GdkWindow       *window,
  520.               GtkStateType     state_type,
  521.               GtkShadowType    shadow_type,
  522.               gint             x,
  523.               gint             y,
  524.               gint             width,
  525.               gint             height);
  526. void gtk_draw_check      (GtkStyle        *style,
  527.               GdkWindow       *window,
  528.               GtkStateType     state_type,
  529.               GtkShadowType    shadow_type,
  530.               gint             x,
  531.               gint             y,
  532.               gint             width,
  533.               gint             height);
  534. void gtk_draw_option     (GtkStyle        *style,
  535.               GdkWindow       *window,
  536.               GtkStateType     state_type,
  537.               GtkShadowType    shadow_type,
  538.               gint             x,
  539.               gint             y,
  540.               gint             width,
  541.               gint             height);
  542. void gtk_draw_tab        (GtkStyle        *style,
  543.               GdkWindow       *window,
  544.               GtkStateType     state_type,
  545.               GtkShadowType    shadow_type,
  546.               gint             x,
  547.               gint             y,
  548.               gint             width,
  549.               gint             height);
  550. void gtk_draw_shadow_gap (GtkStyle        *style,
  551.               GdkWindow       *window,
  552.               GtkStateType     state_type,
  553.               GtkShadowType    shadow_type,
  554.               gint             x,
  555.               gint             y,
  556.               gint             width,
  557.               gint             height,
  558.               GtkPositionType  gap_side,
  559.               gint             gap_x,
  560.               gint             gap_width);
  561. void gtk_draw_box_gap    (GtkStyle        *style,
  562.               GdkWindow       *window,
  563.               GtkStateType     state_type,
  564.               GtkShadowType    shadow_type,
  565.               gint             x,
  566.               gint             y,
  567.               gint             width,
  568.               gint             height,
  569.               GtkPositionType  gap_side,
  570.               gint             gap_x,
  571.               gint             gap_width);
  572. void gtk_draw_extension  (GtkStyle        *style,
  573.               GdkWindow       *window,
  574.               GtkStateType     state_type,
  575.               GtkShadowType    shadow_type,
  576.               gint             x,
  577.               gint             y,
  578.               gint             width,
  579.               gint             height,
  580.               GtkPositionType  gap_side);
  581. void gtk_draw_focus      (GtkStyle        *style,
  582.               GdkWindow       *window,
  583.               gint             x,
  584.               gint             y,
  585.               gint             width,
  586.               gint             height);
  587. void gtk_draw_slider     (GtkStyle        *style,
  588.               GdkWindow       *window,
  589.               GtkStateType     state_type,
  590.               GtkShadowType    shadow_type,
  591.               gint             x,
  592.               gint             y,
  593.               gint             width,
  594.               gint             height,
  595.               GtkOrientation   orientation);
  596. void gtk_draw_handle     (GtkStyle        *style,
  597.               GdkWindow       *window,
  598.               GtkStateType     state_type,
  599.               GtkShadowType    shadow_type,
  600.               gint             x,
  601.               gint             y,
  602.               gint             width,
  603.               gint             height,
  604.               GtkOrientation   orientation);
  605. void gtk_draw_expander   (GtkStyle        *style,
  606.                           GdkWindow       *window,
  607.                           GtkStateType     state_type,
  608.                           gint             x,
  609.                           gint             y,
  610.               GtkExpanderStyle expander_style);
  611. void gtk_draw_layout     (GtkStyle        *style,
  612.                           GdkWindow       *window,
  613.                           GtkStateType     state_type,
  614.               gboolean         use_text,
  615.                           gint             x,
  616.                           gint             y,
  617.                           PangoLayout     *layout);
  618. void gtk_draw_resize_grip (GtkStyle       *style,
  619.                            GdkWindow      *window,
  620.                            GtkStateType    state_type,
  621.                            GdkWindowEdge   edge,
  622.                            gint            x,
  623.                            gint            y,
  624.                            gint            width,
  625.                            gint            height);
  626. #endif /* GTK_DISABLE_DEPRECATED */
  627.  
  628. void gtk_paint_hline      (GtkStyle        *style,
  629.                GdkWindow       *window,
  630.                GtkStateType     state_type,
  631.                GdkRectangle    *area,
  632.                GtkWidget       *widget,
  633.                const gchar     *detail,
  634.                gint             x1,
  635.                gint             x2,
  636.                gint             y);
  637. void gtk_paint_vline      (GtkStyle        *style,
  638.                GdkWindow       *window,
  639.                GtkStateType     state_type,
  640.                GdkRectangle    *area,
  641.                GtkWidget       *widget,
  642.                const gchar     *detail,
  643.                gint             y1_,
  644.                gint             y2_,
  645.                gint             x);
  646. void gtk_paint_shadow     (GtkStyle        *style,
  647.                GdkWindow       *window,
  648.                GtkStateType     state_type,
  649.                GtkShadowType    shadow_type,
  650.                GdkRectangle    *area,
  651.                GtkWidget       *widget,
  652.                const gchar     *detail,
  653.                gint             x,
  654.                gint             y,
  655.                gint             width,
  656.                gint             height);
  657. void gtk_paint_polygon    (GtkStyle        *style,
  658.                GdkWindow       *window,
  659.                GtkStateType     state_type,
  660.                GtkShadowType    shadow_type,
  661.                GdkRectangle    *area,
  662.                GtkWidget       *widget,
  663.                const gchar     *detail,
  664.                GdkPoint        *points,
  665.                gint             npoints,
  666.                gboolean         fill);
  667. void gtk_paint_arrow      (GtkStyle        *style,
  668.                GdkWindow       *window,
  669.                GtkStateType     state_type,
  670.                GtkShadowType    shadow_type,
  671.                GdkRectangle    *area,
  672.                GtkWidget       *widget,
  673.                const gchar     *detail,
  674.                GtkArrowType     arrow_type,
  675.                gboolean         fill,
  676.                gint             x,
  677.                gint             y,
  678.                gint             width,
  679.                gint             height);
  680. void gtk_paint_diamond    (GtkStyle        *style,
  681.                GdkWindow       *window,
  682.                GtkStateType     state_type,
  683.                GtkShadowType    shadow_type,
  684.                GdkRectangle    *area,
  685.                GtkWidget       *widget,
  686.                const gchar     *detail,
  687.                gint             x,
  688.                gint             y,
  689.                gint             width,
  690.                gint             height);
  691. void gtk_paint_box        (GtkStyle        *style,
  692.                GdkWindow       *window,
  693.                GtkStateType     state_type,
  694.                GtkShadowType    shadow_type,
  695.                GdkRectangle    *area,
  696.                GtkWidget       *widget,
  697.                const gchar     *detail,
  698.                gint             x,
  699.                gint             y,
  700.                gint             width,
  701.                gint             height);
  702. void gtk_paint_flat_box   (GtkStyle        *style,
  703.                GdkWindow       *window,
  704.                GtkStateType     state_type,
  705.                GtkShadowType    shadow_type,
  706.                GdkRectangle    *area,
  707.                GtkWidget       *widget,
  708.                const gchar     *detail,
  709.                gint             x,
  710.                gint             y,
  711.                gint             width,
  712.                gint             height);
  713. void gtk_paint_check      (GtkStyle        *style,
  714.                GdkWindow       *window,
  715.                GtkStateType     state_type,
  716.                GtkShadowType    shadow_type,
  717.                GdkRectangle    *area,
  718.                GtkWidget       *widget,
  719.                const gchar     *detail,
  720.                gint             x,
  721.                gint             y,
  722.                gint             width,
  723.                gint             height);
  724. void gtk_paint_option     (GtkStyle        *style,
  725.                GdkWindow       *window,
  726.                GtkStateType     state_type,
  727.                GtkShadowType    shadow_type,
  728.                GdkRectangle    *area,
  729.                GtkWidget       *widget,
  730.                const gchar     *detail,
  731.                gint             x,
  732.                gint             y,
  733.                gint             width,
  734.                gint             height);
  735. void gtk_paint_tab        (GtkStyle        *style,
  736.                GdkWindow       *window,
  737.                GtkStateType     state_type,
  738.                GtkShadowType    shadow_type,
  739.                GdkRectangle    *area,
  740.                GtkWidget       *widget,
  741.                const gchar     *detail,
  742.                gint             x,
  743.                gint             y,
  744.                gint             width,
  745.                gint             height);
  746. void gtk_paint_shadow_gap (GtkStyle        *style,
  747.                GdkWindow       *window,
  748.                GtkStateType     state_type,
  749.                GtkShadowType    shadow_type,
  750.                GdkRectangle    *area,
  751.                GtkWidget       *widget,
  752.                gchar           *detail,
  753.                gint             x,
  754.                gint             y,
  755.                gint             width,
  756.                gint             height,
  757.                GtkPositionType  gap_side,
  758.                gint             gap_x,
  759.                gint             gap_width);
  760. void gtk_paint_box_gap    (GtkStyle        *style,
  761.                GdkWindow       *window,
  762.                GtkStateType     state_type,
  763.                GtkShadowType    shadow_type,
  764.                GdkRectangle    *area,
  765.                GtkWidget       *widget,
  766.                gchar           *detail,
  767.                gint             x,
  768.                gint             y,
  769.                gint             width,
  770.                gint             height,
  771.                GtkPositionType  gap_side,
  772.                gint             gap_x,
  773.                gint             gap_width);
  774. void gtk_paint_extension  (GtkStyle        *style,
  775.                GdkWindow       *window,
  776.                GtkStateType     state_type,
  777.                GtkShadowType    shadow_type,
  778.                GdkRectangle    *area,
  779.                GtkWidget       *widget,
  780.                gchar           *detail,
  781.                gint             x,
  782.                gint             y,
  783.                gint             width,
  784.                gint             height,
  785.                GtkPositionType  gap_side);
  786. void gtk_paint_focus      (GtkStyle        *style,
  787.                GdkWindow       *window,
  788.                GtkStateType     state_type,
  789.                GdkRectangle    *area,
  790.                GtkWidget       *widget,
  791.                const gchar     *detail,
  792.                gint             x,
  793.                gint             y,
  794.                gint             width,
  795.                gint             height);
  796. void gtk_paint_slider     (GtkStyle        *style,
  797.                GdkWindow       *window,
  798.                GtkStateType     state_type,
  799.                GtkShadowType    shadow_type,
  800.                GdkRectangle    *area,
  801.                GtkWidget       *widget,
  802.                const gchar     *detail,
  803.                gint             x,
  804.                gint             y,
  805.                gint             width,
  806.                gint             height,
  807.                GtkOrientation   orientation);
  808. void gtk_paint_handle     (GtkStyle        *style,
  809.                GdkWindow       *window,
  810.                GtkStateType     state_type,
  811.                GtkShadowType    shadow_type,
  812.                GdkRectangle    *area,
  813.                GtkWidget       *widget,
  814.                const gchar     *detail,
  815.                gint             x,
  816.                gint             y,
  817.                gint             width,
  818.                gint             height,
  819.                GtkOrientation   orientation);
  820. void gtk_paint_expander   (GtkStyle        *style,
  821.                            GdkWindow       *window,
  822.                            GtkStateType     state_type,
  823.                            GdkRectangle    *area,
  824.                            GtkWidget       *widget,
  825.                            const gchar     *detail,
  826.                            gint             x,
  827.                            gint             y,
  828.                GtkExpanderStyle expander_style);
  829. void gtk_paint_layout     (GtkStyle        *style,
  830.                            GdkWindow       *window,
  831.                            GtkStateType     state_type,
  832.                gboolean         use_text,
  833.                            GdkRectangle    *area,
  834.                            GtkWidget       *widget,
  835.                            const gchar     *detail,
  836.                            gint             x,
  837.                            gint             y,
  838.                            PangoLayout     *layout);
  839.  
  840. void gtk_paint_resize_grip (GtkStyle        *style,
  841.                             GdkWindow        *window,
  842.                             GtkStateType         state_type,
  843.                             GdkRectangle        *area,
  844.                             GtkWidget        *widget,
  845.                             const gchar        *detail,
  846.                             GdkWindowEdge        edge,
  847.                             gint                 x,
  848.                             gint                 y,
  849.                             gint                 width,
  850.                             gint                height);
  851.  
  852.  
  853. GType      gtk_border_get_type (void) G_GNUC_CONST;
  854. GtkBorder *gtk_border_copy     (const GtkBorder *border_);
  855. void       gtk_border_free (   GtkBorder       *border_);
  856.  
  857. /* --- private API --- */
  858. const GValue* _gtk_style_peek_property_value (GtkStyle           *style,
  859.                           GType               widget_type,
  860.                           GParamSpec         *pspec,
  861.                           GtkRcPropertyParser parser);
  862.  
  863. void _gtk_style_init_for_settings (GtkStyle    *style,
  864.                    GtkSettings *settings);
  865.  
  866. /* deprecated */
  867. #ifndef GTK_DISABLE_DEPRECATED
  868. #define gtk_style_apply_default_pixmap(s,gw,st,a,x,y,w,h) gtk_style_apply_default_background (s,gw,1,st,a,x,y,w,h)
  869. void gtk_draw_string     (GtkStyle        *style,
  870.               GdkWindow       *window,
  871.               GtkStateType     state_type,
  872.               gint             x,
  873.               gint             y,
  874.               const gchar     *string);
  875. void gtk_paint_string     (GtkStyle        *style,
  876.                GdkWindow       *window,
  877.                GtkStateType     state_type,
  878.                GdkRectangle    *area,
  879.                GtkWidget       *widget,
  880.                const gchar     *detail,
  881.                gint             x,
  882.                gint             y,
  883.                const gchar     *string);
  884. #endif /* GTK_DISABLE_DEPRECATED */
  885.  
  886. void   gtk_draw_insertion_cursor (GtkWidget        *widget,
  887.                   GdkDrawable      *drawable,
  888.                   GdkRectangle     *area,
  889.                   GdkRectangle     *location,
  890.                   gboolean          is_primary,
  891.                   GtkTextDirection  direction,
  892.                   gboolean          draw_arrow);
  893.  
  894. G_END_DECLS
  895.  
  896. #endif /* __GTK_STYLE_H__ */
  897.